package com.hogan.basiclibrary.base.app;

import android.Manifest;
import android.app.Application;

import com.squareup.leakcanary.LeakCanary;
import com.tbruyelle.rxpermissions.RxPermissions;


/**
 * Created by chenhu on 2017/10/13.
 */

public class BaseApplication extends Application {
    private static BaseApplication instance;

    public BaseApplication() {
    }

    public static Application getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        RxPermissions.getInstance(this)
                .request(Manifest.permission.ACCESS_COARSE_LOCATION,
                        Manifest.permission.ACCESS_FINE_LOCATION,
                        Manifest.permission.WRITE_EXTERNAL_STORAGE,
                        Manifest.permission.READ_PHONE_STATE,
                        Manifest.permission.CALL_PHONE,
                        Manifest.permission.CAMERA);
        LeakCanary.install(this);
    }

}
